Generally speaking, image data, in particular, motion picture data, has a large data amount. Therefore, when image data is transmitted from a transmission apparatus to a reception apparatus, or when image data is stored in a storage unit, motion picture coding is previously carried out. “Motion picture coding” means the coding process of converting a certain data sequence to another data sequence, and means the process of compressing the data amount. As a typical motion picture coding method, H.264/AVC (ITU-T H.264/ISO/IEC MPEG-4AVC) may be cited.
A motion picture signal has a luminance signal and a color-difference signal. Motion picture coding is carried out on a YUV (YCbCr) signal, for example. There are color formats, i.e., 4:2:0, 4:2:2, 4:4:4 and so forth, depending on information amounts of the color-difference signal with respect to the luminance signal.
Motion picture includes plural pictures. In motion picture coding, generally speaking, a picture is divided into plural blocks (macroblocks), and a slice having the plural macroblocks is formed. A macroblock includes, for example, 16×16 pixels. One picture includes one or more slices.
According to H.264/AVC, in order to conform to a profile defined in the standard, there is a case where one picture is divided into plural slices. As the profile, a case of High 10 Profile, High 4:2:2 Profile, or the like, for example, may be cited.
In motion picture coding including H.264/AVC, when a macroblock is coded, generally classifying, there are two types of prediction methods, i.e., intra-frame prediction (intra prediction) and inter-frame prediction (inter prediction).
According to intra prediction, peripheral pixels of a target macroblock in a frame are used, and pixel differences are coded. At this time, prediction across a slice boundary is not performed. On the other hand, according to inter prediction, an already coded picture is referred to, and motion vectors and pixel differences are coded.
There are three types of pictures depending on coding methods. I-pictures are coded only by intra prediction. P-pictures are coded using intra prediction and inter prediction, but a reference direction for an already coded picture is limited to a forward direction. B-pictures are coded using intra prediction and inter prediction, and as a reference direction for an already coded picture, both forward and backward directions may be selected.
Next, intra prediction will be described. According to intra prediction, pixel values of left, upward and left-upward adjacent already coded blocks may be referred to. As a coding method to be used to code a luminance signal, a selection is made from coding modes of Intra 16×16, Intra 8×8 and Intra 4×4, depending on respective block sizes in intra prediction. For these coding modes, directions of adjacent pixels that may be referred to for prediction are prescribed, respectively. According to Intra 16×16, a selection may be made from 4 direction modes. According to Intra 8×8 and Intra 4×4, a selection may be made from 9 direction modes.
As to a coding method to be used to code a color-difference signal, prediction is carried out in only a 8×8 block unit in a case of the 4:2:0 format, and a prediction direction may be selected from 4 direction modes. The same or similar way applies to a case of the 4:2:2 format.
FIGS. 1A, 1B, 1C and 1D depict prediction directions according to intra prediction for a color-difference signal. As depicted in FIGS. 1A, 1B, 1C and 1D, there are 4 types of prediction directions for a color-difference signal according to intra prediction, i.e., peripheral pixel average prediction (DC prediction) (FIG. 1A), horizontal prediction (FIG. 1B), vertical prediction (FIG. 1C) and plane prediction (FIG. 1D). Only in a case of the peripheral pixel average prediction (DC prediction), internal pixels are divided into 4×4 blocks, and in each block, averages are obtained while upward and left peripheral pixel values are referred to. Hereinafter, intra prediction for a color-difference signal may be also simply referred to as “color-difference intra”.
Orthogonal transformation and coefficient cutting will now be described. Generally speaking, in an image signal, correlation between adjacent pixels is high. When orthogonal transformation is used, bias occurs in frequency components of transformed coefficients, and respective coefficients from low frequency to high frequency are calculated. The lowest frequency component is called a direct-current (DC) component, and the other components are called alternate-current (AC) components.
Generally speaking, high-frequency components (absolute values) are smaller than low-frequency components (absolute values). According to H.264/AVC, discrete cosine transform (DCT) or discrete Hadamard transform (DHT) is used as orthogonal transformation, and orthogonal transformation is carried out in 4×4-pixel units or 8×8-pixel units.
FIG. 2 depicts an example of DCT in 4×4-pixel units. In the example of FIG. 2, a 16×16-pixel luminance macroblock 11 is divided into 16 4×4-pixel blocks, and DCT is carried out on each of the 16 blocks. In the block (for example, a block 13 in FIG. 2) obtained from DCT, the coefficient of DC component (20 in the example of FIG. 2) is larger while the other coefficients of AC components are smaller.
A block 12 depicted in FIG. 2 represents a 4×4-pixel block before DCT. When DCT is carried out on the coefficients of the block 12, the coefficients are transformed into coefficients of the block 13. The top-left coefficient in the block 13 corresponds to a coefficient of the DC component 20.
The coefficients after undergoing DCT are quantized according to a quantization parameter. The quantization parameter is set so that a designated bit rate may be ensured. Such a control method is called “rate control”, and a method according to Test Model 5 (TM5) is a common method thereof.
As to the quantization parameter, the maximum value is determined in the standard, and setting a value higher than the maximum value is not allowed. Therefore, in order to realize a low video rate operation, there is a method in which transformed coefficients are forcibly changed into “0” while image quality is degraded accordingly. Such a method is called “coefficient cutting”. Coefficient cutting means a replacement of a coefficient(s) by “0”.
As a technology of carrying out “coefficient cutting”, there is a technique, for example, in which an adjustment is carried out in such a manner that quantized coefficients are replaced by “0” for a certain block based on an estimated code amount of a to-be-processed block and a target code amount.